package collection.list;

import java.util.LinkedList;

public class LinkedListSample {
    public static void main(String[] args) {
        LinkedList<String> bookList = new LinkedList<String>();

        bookList.add("鸡你太美");
        bookList.add("只因你太美");
        bookList.add("是否有根");
        bookList.add("你妹根了");
        System.out.println(bookList);
        // Output: [鸡你太美, 只因你太美, 是否有根, 你妹根了]

        bookList.addFirst("你没只因只因");
        bookList.addLast("小黑子苏珊");
        System.out.println(bookList);
        // Output: [你没只因只因, 鸡你太美, 只因你太美, 是否有根, 你妹根了, 小黑子苏珊]



    }
}
